﻿Public Class UndoRedoToken
    Public Property UndoMethod As Action(Of Object)
    Public Property RedoMethod As Action(Of Object)
    Public Property Data As Object
    Public Property Display As String
    Sub New()

    End Sub
    Sub New(ByVal UndoRedoMethod As Action(Of Object), ByVal data As Object)
        UndoMethod = UndoRedoMethod
        RedoMethod = UndoRedoMethod
        Me.Data = data
    End Sub
    Sub New(ByVal UndoRedoMethod As Action(Of Object), ByVal data As Object, ByVal display As String)
        UndoMethod = UndoRedoMethod
        RedoMethod = UndoRedoMethod
        Me.Data = data
        Me.Display = display
    End Sub
    Public Shared Function IsUsable(ByVal token As UndoRedoToken) As Boolean
        If token Is Nothing Then Return False
        Return token.RedoMethod IsNot Nothing And token.UndoMethod IsNot Nothing
    End Function

    
End Class
